//
//  ViewController.m
//  OCBrigdeSwiftDemo
//
//  Created by chenzm on 2018/8/8.
//  Copyright © 2018年 chenzm. All rights reserved.
//

#import "ViewController.h"

#import "OCBrigdeSwiftDemo-Swift.h"
@interface ViewController ()

@end
@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self ocBridgeSwift];
    
    
    [self initBaseUI];
    
}

#pragma mark - init

-(void)initBaseUI{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(100, 100, 100, 100);
    btn.backgroundColor = [UIColor redColor];
    [btn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
}


#pragma mark - method

-(void)btnAction:(UIButton *)sender{
    SFirVC *vc = [SFirVC new];
    [self presentViewController:vc animated:YES completion:^{
        
    }];
}


///oc初始化调用swift方法
-(void)ocBridgeSwift{
    Tools *tools = [[Tools alloc]initWithAddress:@"地址" gender:@"性别"];
    [tools methodprintOC];
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
@end
